package com.hdoit.apollo.logical.billing.service.impl;

import org.springframework.stereotype.Component;

import com.tennetcn.core.common.enums.pub.YesOrNoInteger;
import com.tennetcn.core.common.utils.CommonUtils;
import com.tennetcn.core.common.utils.DateUtils;
import com.tennetcn.data.dao.base.impl.SuperService;
import com.tennetcn.data.enums.ModelStatus;
import com.hdoit.apollo.logical.billing.model.BillingRecord;
import com.hdoit.apollo.logical.billing.service.IBillingRecordService;
/**
 * @author      tancongzhu
 * @email       
 * @createtime  2018年04月20日 18:03:09
 * @comment
 */
@Component
public class BillingRecordServiceImpl extends SuperService<BillingRecord> implements IBillingRecordService{

	@Override
	public boolean saveBillingRecord(String billingId, Double operateNum, Double operateMoney, String type,
			String operateId, String shopId, String createUserId, String createUserName) {
		BillingRecord billingRecord = new BillingRecord();
		billingRecord.setModelStatus(ModelStatus.add);
		billingRecord.setRecordId(CommonUtils.getKeyId());
		
		billingRecord.setBillingId(billingId);
		billingRecord.setOperateNum(operateNum);
		billingRecord.setOperateMoney(operateMoney);
		billingRecord.setType(type);
		billingRecord.setOperateId(operateId);
		billingRecord.setShopId(shopId);
        billingRecord.setCreateDate(DateUtils.getCurrent());
        billingRecord.setCreateUserId(createUserId);
        billingRecord.setCreateUserName(createUserName);
        billingRecord.setDeleteMark(YesOrNoInteger.no);
		return super.applyChange(billingRecord);
		
	}

}